﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace GmailMetroNotifier.Client.Business
{
    /// <summary>
    /// Provides data for the <see cref="IGmailManager.AuthenticationSucceeded"/> event.
    /// </summary>
    public class AuthenticationSucceededEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the username of the credentials used for authenticating.
        /// </summary>
        public string UserName { get; private set; }

        /// <summary>
        /// Gets the password of the credentials used for authenticating. This value is null if the 
        /// password used before was from <see cref="NetworkCredential.SecurePassword"/>.
        /// </summary>
        public string Password { get; private set; }

        /// <summary>
        /// Initializes a new instance of the class with the the given username and password.
        /// </summary>
        /// <param name="userName">The username used for authenticating.</param>
        /// <param name="password">The password used for authenticating.</param>
        public AuthenticationSucceededEventArgs(string userName, string password)
            : base()
        {
            this.UserName = userName;

            this.Password = password;
        }
    }
}
